package common

type ErrorCode struct {
	Code string
	Msg  string
}

var (
	ErrOk     = &ErrorCode{Code: "200", Msg: "success"}
	ErrFail   = &ErrorCode{Code: "500", Msg: "server error"}
	ErrCommon = &ErrorCode{Code: "501", Msg: "biz error"}
	ErrParam  = &ErrorCode{Code: "502", Msg: "param error"}
	ErrPath   = &ErrorCode{Code: "503", Msg: "path error"}
	ErrAuth   = &ErrorCode{Code: "600", Msg: "no auth"}
)

var NoAuthPath = make(map[string]bool)

func init() {
	NoAuthPath["/auth/login"] = true
	NoAuthPath["/sse/conn"] = true
	NoAuthPath["/sse/close"] = true
}
